﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DreamBuilder.Common;
using ePlanet.ArchiveBorrow.Models;
using System.Data;

namespace ePlanet.ArchiveBorrow.Services
{
    public interface IArchiveBorrowService : IBusiness
    {
        void InsertNewArchiveBorrowModel(ArchiveBorrowModel model);
        void UpdateArchiveBorrowModel(ArchiveBorrowModel model);
        ArchiveBorrowModel GetSingleArchiveBorrowModelByDataID(Guid dataID);
        ArchiveBorrowModel GetArchiveBorrowModelListByUserID(Guid userID, int statusID, int beginNum, int count, out int sum);
        ArchiveBorrowModel GetArchiveBorrowModelListByArchiveType(string achiveType, int statusID, int beginNum, int count, out int sum);
        void PaperArchiveLend(string archiveDataID, DateTime rerutntime);
        void PaperArchiveReturn(string archiveDataID);
        DataTable GetToUserList(int roleID);
        ArchiveBorrowModel GetFaild(string userID, int beginNum, int count, ref int sum);
        ArchiveBorrowModel GetAgent(string userID, int beginNum, int count, string filter, ref int sum);
        ArchiveBorrowModel GetDone(string userID, int beginNum, int count, string filter, ref int sum);
        ArchiveBorrowModel GetTotale(string userID, int beginNum, int count, out int sum);
        ArchiveBorrowModel GetHasLend(string userID, int beginNum, int count, out int sum);
        ArchiveBorrowModel GetHasReturn(string userID, int beginNum, int count, out int sum);
        bool GetNewOrderID(out string newOrderID);
        bool IsAllFinish(string dataID);
        List<ArchiveBorrowModel> GetArchiveBorrowOrderData(string dataID);

        //Add by Yidnae
        //Date:2014年5月12日01:51:43
        List<ArchiveBorrowMenuItem> GetAllArchiveBorrowMenu();

        Dictionary<string, int> GetrchiveBorrowStatistics(DateTime beginTime, DateTime endTime, int archiveType);
    }
}
